<div class="col-12">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{ .label }}</h3>
            <div class="card-tools">
                <div class="input-group input-group-sm" style="width: 250px;">
                    <a class="btn btn-success btn-sm" data-toggle="modal" data-target="#addsmbModal" title="添加">
                        <i class="fa fa-plus "></i>
                    </a>
                    <input id="search-key" type="text" name="table_search" class="form-control float-right"
                           placeholder="Search" value="{{ .key }}">
                    <div class="input-group-append">
                        <a type="submit" class="btn btn-default" id="search-a">
                            <i class="fa fa-search" style="color: grey"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.card-header -->
        <div class="card-body table-responsive p-0">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>用户</th>
                    <th>权限组</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{ range  .data_list }}
                    <tr name="tbody">
                        <td>{{ .Id }}</td>
                        <td>{{ .User }}</td>
                        <td><a href="javascript:;" name="view-perms" class="btn btn-success btn-sm">修改</a><div name="perms" cur_user="{{ .User }}" style="overflow: hidden;width: auto;height: 20px;display: none">{{ .PermsDir }}</div></td>
                        <td>
                            <a class="btn btn-xs btn-info" href="javascript:;" name="change-passwd" cur_user="{{ .User }}" style="text-decoration:none;"  title="修改密码"><span class="fa fa-pencil"></span></a>
                            <a class="btn btn-xs btn-danger" href="javascript:;" name="del-smb-user" cur_user="{{ .User }}" style="text-decoration:none;"  title="删除"><span class="fa fa-trash"></span></a>
                        </td>
                    </tr>
                {{ end }}
                </tbody>
            </table>

        </div>
        <!-- /.card-body -->
        <div class="card-footer clearfix">
        </div>
    </div>
    <!-- /.card -->
</div>


<div class="modal fade" id="addsmbModal" tabindex="-1" role="dialog" aria-labelledby="addsmbModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="addsmbModalLabel">添加用户</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <label> 用户名</label>
                    <input type="text" id="add-user" class="form-control">
                </div>
                <div class="form-group">
                    <label> 密码</label>
                    <input type="password" id="add-user-passwd" class="form-control">
                </div>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="sub-add-user">提交</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="smbModal" tabindex="-1" role="dialog" aria-labelledby="smbModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="smbModalLabel">权限组</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <ul id="treeDemo" class="ztree"></ul>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="sub-smb-perms">提交</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="passwdModal" tabindex="-1" role="dialog" aria-labelledby="passwdModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="passwdModalLabel">权限组</h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            </div>
            <div class="modal-body">
                <label> 新密码</label>
                <input type="password" id="new-passwd" class="form-control">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary" id="sub-passwd-perms">提交</button>
            </div>
        </div>
    </div>
</div>




